// 定义首页需要的接口函数

import request from '@/utils/request'

/**
 * 首页-全部分类（包含推荐商品）
*/
export const findAllCategory = () => {
  return request('/home/category/head')
}

export const findTopCategory = (id) => {
  return request('/category', 'get', { id })
}

export const findSubCategory = (id) => {
  return request('/category/sub/filter', 'get', { id: id })
}

export const findCategoryGoods = (params) => {
  // 做筛选功能
  // return request('/category/goods', 'post', params)
  // 做分页功能
  return request('/category/goods/temporary', 'post', params)
}
